//
//  YFUserApi.h
//  CoollangTennisBall
//
//  Created by Coollang on 2018/1/13.
//  Copyright © 2018年 Coollang-YF. All rights reserved.
//

#import "YFBaseRequest.h"

@interface YFUserApi : YFBaseRequest

// 获取个人信息
+ (instancetype)requestGetUserInfoWithComplate:(void(^)(BOOL success, UserInforItem *infoitem))complateBlock;

/* --保存个人信息--
 UserName 不能为空
 Sex  不能为空
 Birthday  可为空,直接不传 或传空字符串
 Height 可为空,直接不传 或传空字符串
 Weight 可为空,直接不传 或传空字符串
 SportAge 可为空,直接不传 或传空字符串
 Hand 可为空,直接不传 或传空字符串
 */
+ (instancetype)requestSvaeUserInfoWithUserName:(NSString *)userName
                               birthday:(NSString *)birthday
                                 isMale:(NSString *)gender
                                 height:(NSString *)height
                                 weight:(NSString *)weight
                              signature:(NSString *)signature
                               SportAge:(NSString *)sportAge
                                Address:(NSString *)address
                                   Hand:(NSString *)hand
                             RaketBrand:(NSString *)brand
                                StartTennisYear:(NSString *)startTennisYear
                                          Level:(NSString *)tennisLevel
                                       complete:(void(^)(NSError *error))completeBlock;

/**
 * 读取已得勋章
 */
+ (instancetype)initWithReadMedalsString:(NSString *)medalsString;

/**
 * 用户反馈-图片大小限制是1024k
 * email 不能为空， content和images至少得有一个
 */
+ (instancetype)feedbackWithImages:(NSArray <UIImage *>*)images email:(NSString *)email content:(NSString *)content complete:(void(^)(NSError *error))complateBlock;

/**
 * 上传头像，鞋子，装备图片
 */
+ (instancetype)uploadImageWithRequestType:(RequestApiType)apiType withImage:(UIImage *)image complete:(void(^)(NSError *error,NSString *imageUrl))complateBlock;


/**
 * 4个无参数接口
 *
 * 1.获取个人主页统计数据
 * 2.获取个人主页年统计数据
 * 3.获取装备信息
 * 4.获取生涯列表
 */
+ (instancetype)requestGetUserDataWithReqType:(RequestApiType)apiType;

/**
 * 保存装备信息
 */
+ (instancetype)performSaveEquipInfoWithBrand:(NSString *)brand
                              buyTime:(NSString *)buyTime
                         verticalLine:(NSString *)verticalLine
                                 line:(NSString *)line
                            shoesName:(NSString *)shoesName
                         shoesBuyTime:(NSString *)shoesBuyTime;

/**
 * 删除生涯
 */
+ (instancetype)deleteCareerWithCareerID:(NSString *)careerId complete:(void(^)(NSError *error))complateBlock;

/**
 * 添加或修改生涯
 * careerId: 值为nil时为添加生涯
 * year:  生涯的时间，单位（年）
 * careerContent:生涯事迹内容
 */
+ (instancetype)addOrChangeCareerWithCareerID:(NSString *)careerId year:(NSString *)year careerContent:(NSString *)careerContent;


@end
